/**
 * Created by fanweihua on 2016/12/3.
 */
import React from 'react';
import MsgHtml from './msgHtml.js';
import {Link} from 'react-router';

const Msg = React.createClass({
    getInitialState: function () {
        return {
            html: MsgHtml.html,
            successHtml: MsgHtml.successHtml,
            warnHtml: MsgHtml.warnHtml
        };
    },
    render(){
        return (
            <div className="Z_slideIn">
                <div className="page slideIn">
                    <div className="Z_content_code">
                        <div dangerouslySetInnerHTML={{__html: this.state.html}}></div>
                        <div dangerouslySetInnerHTML={{__html: this.state.successHtml}}></div>
                        <div dangerouslySetInnerHTML={{__html: this.state.warnHtml}}></div>
                    </div>
                </div>
                <div className="Z_content">
                    <div className="Z_panel-body-backgound">
                        <MsgNav></MsgNav>
                        {this.props.children}
                    </div>
                </div>
            </div>
        )
    }
});
module.exports = Msg;
const MsgNav = React.createClass({
    render(){
        return (
            <div className="Z_panel-body">
                <div className="page__hd">
                    <h1 className="page__title">Msg</h1>
                    <p className="page__desc">提示页</p>
                </div>
                <div className="page__bd page__bd_spacing">
                    <Link to="/msg/msg_success" className="weui-btn weui-btn_default">成功提示页</Link>
                    <Link to="/msg/msg_warn" className="weui-btn weui-btn_default">失败提示页</Link>
                </div>
            </div>
        );
    }
});